/* 
 * File:   vertex.h
 * Author: kenji
 *
 * Created on December 17, 2013, 8:44 AM
 */

#ifndef VERTEX_H
#define	VERTEX_H

#include "edge.h"
#include <stdio.h>
#include <vector>

#define GNode std::pair< int,int> 

class Vertex
{
public:
    Vertex(int, Vertex *, int, double, double);

    ~Vertex();

    int getId();

    void printEdges();

    void printGraph();

    void connectTo(Vertex *, int);

    Vertex *getNext();

    void insertNext(int id,double,double);

    Edge *getFirstEdge();

    int getSize()const;

    std::vector<GNode> getListOfEdges();

    int position;

    double lat;

    double lon;
private:

    void connectVertex(Edge*, Vertex*, int);

    int id_;

    Edge *edges_;

    Vertex *next_;

    std::vector<GNode> nodes_;

};



#endif	/* VERTEX_H */

